

cd "Replication"
* Commands not built-in that are needed
* ssc install reghdfe
* ssc install outreg2
* ssc install sutex2
* ssc install boottest


log using "Carreri_Teso_REStat", replace

* Date: April 8, 2021
**********************************************
*                                            *
*                                            *
*                 MAIN TABLES                *
*                                            *
*                                            *
**********************************************

***********
* Table 1 *
***********
use "Data/CarreriTeso_MC_Congress_level_data.dta", clear
* column 1
reghdfe wnom1_redistr_issue recession_state_18_25, absorb(congress_chamber) cluster(state_cluster_1 icpsr) keepsingletons
su wnom1_redistr_issue if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/Table1.tex", se bdec(3) keep(recession_state_18_25) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, Yes, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, No, Cohort FE, No, State 18-25 Dummies, No, Cohort Trends, No, State Represented FE, No) ///
		nocons label
* column 2
reghdfe wnom1_redistr_issue recession_state_18_25 *_siFE_2 birth_*, absorb(birth congress_chamber) cluster(state_cluster_1 icpsr) keepsingletons
su wnom1_redistr_issue if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/Table1.tex", se bdec(3) keep(recession_state_18_25) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, Yes, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, No, Cohort FE, Yes, State 18-25 Dummies, Yes, Cohort Trends, Yes, State Represented FE, No) ///
		nocons	label
* column 3
reghdfe wnom1_redistr_issue_wp recession_state_18_25 *_siFE_2 birth_*, absorb(birth congress_chamber_party) cluster(state_cluster_1 icpsr) keepsingletons
su wnom1_redistr_issue_wp if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/Table1.tex", se bdec(3) keep(recession_state_18_25) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, No, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, Yes, Cohort FE, Yes, State 18-25 Dummies, Yes, Cohort Trends, Yes, State Represented FE, No) ///
		nocons label
* column 4
reghdfe wnom1_redistr_issue_wp recession_state_18_25 *_siFE_2 birth_*, absorb(birth congress_chamber_state_party) cluster(state_cluster_1 icpsr) keepsingletons
su wnom1_redistr_issue_wp if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/Table1.tex", se bdec(3) keep(recession_state_18_25) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, No, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, Yes, Cohort FE, Yes, State 18-25 Dummies, Yes, Cohort Trends, Yes, State Represented FE, Yes) ///
		nocons label
* column 5
reghdfe wnom1_redistr_issue_wp recession_state_18_25 *_siFE_2 birth_* if dem==1, absorb(birth congress_chamber) cluster(state_cluster_1 icpsr) keepsingletons
su wnom1_redistr_issue_wp if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/Table1.tex", se bdec(3) keep(recession_state_18_25) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, No, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, Yes, Cohort FE, Yes, State 18-25 Dummies, Yes, Cohort Trends, Yes, State Represented FE, No) ///
		nocons	label	
* column 6
reghdfe wnom1_redistr_issue_wp recession_state_18_25 *_siFE_2 birth_* if dem==0, absorb(birth congress_chamber) cluster(state_cluster_1 icpsr) keepsingletons
su wnom1_redistr_issue_wp if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/Table1.tex", se bdec(3) keep(recession_state_18_25) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, No, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, Yes, Cohort FE, Yes, State 18-25 Dummies, Yes, Cohort Trends, Yes, State Represented FE, No) ///
		nocons label	



***********
* Table 2 *
***********
* Panel A
use "Data/CarreriTeso_redistribution_bill_level_data.dta", clear
foreach i in 8 15 18 88 45 26 86 103 3 {
reghdfe vote_conservative recession_state_18_25 *_siFE_2 birth_* if (issue1==`i' | issue2==`i'), absorb(birth congress_chamber_party_b) cluster(state_cluster_1 icpsr) keepsingletons
su vote_conservative if e(sample)==1 & recession_state_18_25==0
local mean`i': display %5.3fc `r(mean)' 
local b`i' = _b[recession_state_18_25]
local ub_b`i' = _b[recession_state_18_25] + 1.96*_se[recession_state_18_25]
local lb_b`i' = _b[recession_state_18_25] - 1.96*_se[recession_state_18_25]
gen b`i'_st=`b`i''/`mean`i''
su b`i'_st
local b`i'_st: display %5.3fc `r(mean)'
outreg2 using "Results/Table2_panelA.tex", se bdec(3) keep(recession_state_18_25) ///
		adds(Mean DV, `mean`i'', Percent Change, `b`i'_st' ) ///
		addtext(Issue, `i') nocons label
}
* Panel B
use "Data/CarreriTeso_placebo_bill_level_data.dta", clear
foreach i in 22 5 16 21 59 61 73 81 36  {
reghdfe vote_conservative_soc recession_state_18_25 *_siFE_2 birth_* if (issue1==`i' | issue2==`i'), absorb(birth congress_chamber_party_b) cluster(state_cluster_1 icpsr) keepsingletons
su vote_conservative_soc if e(sample)==1 & recession_state_18_25==0
local mean`i': display %5.3fc `r(mean)' 
local b`i' = _b[recession_state_18_25]
local ub_b`i' = _b[recession_state_18_25] + 1.96*_se[recession_state_18_25]
local lb_b`i' = _b[recession_state_18_25] - 1.96*_se[recession_state_18_25]
gen b`i'_st=`b`i''/`mean`i''
su b`i'_st
local b`i'_st: display %5.3fc `r(mean)'
outreg2 using "Results/Table2_panelB.tex", se bdec(3) keep(recession_state_18_25) ///
		adds(Mean DV, `mean`i'', Percent Change, `b`i'_st' ) ///
		addtext(Issue, `i') nocons label
}



***********
* Table 3 *
***********
use "Data/CarreriTeso_MC_Congress_level_data.dta", clear
foreach x in female minority ivy_league elite_share relativ2 {
* columns (1), (3), (5), (7), and (9)
reghdfe `x' recession_state_18_25 *_siFE_2 birth_*, absorb(birth congress_chamber) cluster(state_cluster_1 icpsr) keepsingletons
su `x' if recession_state_18_25==0 & e(sample)==1
local mean: display %5.3fc `r(mean)' 
outreg2 using "Results/Table3.tex", se bdec(3) keep(recession_state_18_25) ///
		adds(Mean No Recession, `mean') ///
		addtext(Congress-Chamber FE, Yes, Congress-Chamber-Party FE, No, Cohort FE, Yes, State 18-25 Dummies, Yes) ///
		nocons label
* columns (2), (4), (6), (8), and (10)
reghdfe `x' recession_state_18_25 *_siFE_2 birth_*, absorb(birth congress_chamber_party) cluster(state_cluster_1 icpsr) keepsingletons
su `x' if recession_state_18_25==0 & e(sample)==1
local mean: display %5.3fc `r(mean)' 
outreg2 using "Results/Table3.tex", se bdec(3) keep(recession_state_18_25) ///
		adds(Mean No Recession, `mean') ///
		addtext(Congress-Chamber FE, No, Congress-Chamber-Party FE, Yes, Cohort FE, Yes, State 18-25 Dummies, Yes) ///
		nocons label
}



***********
* Table 4 *
***********
use "Data/CarreriTeso_MC_Congress_level_data.dta", clear
*** Panel A
* column (1)
reghdfe wnom1_redistr_issue recession_state_10_17, absorb(congress_chamber) cluster(state_highschool_id icpsr) keepsingletons
su wnom1_redistr_issue if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/Table4_panelA.tex", se bdec(3) keep(recession_state_10_17) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, Yes, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, No, Cohort FE, No, State 18-25 Dummies, No) ///
		nocons label
* column (2)
reghdfe wnom1_redistr_issue recession_state_10_17 birth_*, absorb(birth congress_chamber state_highschool_id) cluster(state_highschool_id icpsr) keepsingletons
su wnom1_redistr_issue if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/Table4_panelA.tex", se bdec(3) keep(recession_state_10_17) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, Yes, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, No, Cohort FE, Yes, State 18-25 Dummies, Yes) ///
		nocons label
* column (3)
reghdfe wnom1_redistr_issue_wp recession_state_10_17 birth_*, absorb(birth congress_chamber_party state_highschool_id) cluster(state_highschool_id icpsr) keepsingletons
su wnom1_redistr_issue_wp if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/Table4_panelA.tex", se bdec(3) keep(recession_state_10_17) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, No, Congress-Chamber-Party FE, Yes, Congress-Chamber-Party-State FE, No, Cohort FE, Yes, State 18-25 Dummies, Yes) ///
		nocons 	label
* column (4)
reghdfe wnom1_redistr_issue_wp recession_state_10_17 birth_*, absorb(birth congress_chamber_state_party state_highschool_id) cluster(state_highschool_id icpsr) keepsingletons
su wnom1_redistr_issue_wp if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/Table4_panelA.tex", se bdec(3) keep(recession_state_10_17) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, No, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, Yes, Cohort FE, Yes, State 18-25 Dummies, Yes) ///
		nocons label
* column (5)
reghdfe wnom1_redistr_issue_wp recession_state_10_17 birth_* if dem==1, absorb(birth congress_chamber state_highschool_id) cluster(state_highschool_id icpsr) keepsingletons
su wnom1_redistr_issue_wp if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/Table4_panelA.tex", se bdec(3) keep(recession_state_10_17) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, No, Congress-Chamber-Party FE, Yes, Congress-Chamber-Party-State FE, No, Cohort FE, Yes, State 18-25 Dummies, Yes) ///
		nocons 	label
* column (6)
reghdfe wnom1_redistr_issue_wp recession_state_10_17 birth_* if dem==0, absorb(birth congress_chamber state_highschool_id) cluster(state_highschool_id icpsr) keepsingletons
su wnom1_redistr_issue_wp if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/Table4_panelA.tex", se bdec(3) keep(recession_state_10_17) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, No, Congress-Chamber-Party FE, Yes, Congress-Chamber-Party-State FE, No, Cohort FE, Yes, State 18-25 Dummies, Yes) ///
		nocons 	label
*** Panel B1
* column (1)
reghdfe wnom1_redistr_issue recession_state_26_33_alt, absorb(congress_chamber) cluster(state_25_id icpsr) keepsingletons
su wnom1_redistr_issue if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/Table4_panelB1.tex", se bdec(3) keep(recession_state_26_33_alt) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, Yes, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, No, Cohort FE, No, State 18-25 Dummies, No) ///
		nocons label
* column (2)
reghdfe wnom1_redistr_issue recession_state_26_33_alt birth_*, absorb(birth congress_chamber state_25_id) cluster(state_25_id icpsr) keepsingletons
su wnom1_redistr_issue if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/Table4_panelB1.tex", se bdec(3) keep(recession_state_26_33_alt) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, Yes, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, No, Cohort FE, Yes, State 18-25 Dummies, Yes) ///
		nocons	label
* column (3)
reghdfe wnom1_redistr_issue_wp recession_state_26_33_alt birth_*, absorb(birth congress_chamber_party state_25_id) cluster(state_25_id icpsr) keepsingletons
su wnom1_redistr_issue_wp if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/Table4_panelB1.tex", se bdec(3) keep(recession_state_26_33_alt) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, No, Congress-Chamber-Party FE, Yes, Congress-Chamber-Party-State FE, No, Cohort FE, Yes, State 18-25 Dummies, Yes) ///
		nocons 		label
* column (4)
reghdfe wnom1_redistr_issue_wp recession_state_26_33_alt birth_*, absorb(birth congress_chamber_state_party state_25_id) cluster(state_25_id icpsr) keepsingletons
su wnom1_redistr_issue_wp if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/Table4_panelB1.tex", se bdec(3) keep(recession_state_26_33_alt) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, No, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, Yes, Cohort FE, Yes, State 18-25 Dummies, Yes) ///
		nocons label
* column (5)
reghdfe wnom1_redistr_issue_wp recession_state_26_33_alt birth_* if dem==1, absorb(birth congress_chamber_party state_25_id) cluster(state_25_id icpsr) keepsingletons
su wnom1_redistr_issue_wp if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/Table4_panelB1.tex", se bdec(3) keep(recession_state_26_33_alt) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, No, Congress-Chamber-Party FE, Yes, Congress-Chamber-Party-State FE, No, Cohort FE, Yes, State 18-25 Dummies, Yes) ///
		nocons label
* column (6)
reghdfe wnom1_redistr_issue_wp recession_state_26_33_alt birth_* if dem==0, absorb(birth congress_chamber_party state_25_id) cluster(state_25_id icpsr) keepsingletons
su wnom1_redistr_issue_wp if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/Table4_panelB1.tex", se bdec(3) keep(recession_state_26_33_alt) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, No, Congress-Chamber-Party FE, Yes, Congress-Chamber-Party-State FE, No, Cohort FE, Yes, State 18-25 Dummies, Yes) ///
		nocons label
*** Panel B2
* column (1)
reghdfe wnom1_redistr_issue recession_state_26_33, absorb(congress_chamber) cluster(state_rep_id icpsr) keepsingletons
su wnom1_redistr_issue if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/Table4_panelB2.tex", se bdec(3) keep(recession_state_26_33) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, Yes, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, No, Cohort FE, No, State 18-25 Dummies, No) ///
		nocons label
* column (2)
reghdfe wnom1_redistr_issue recession_state_26_33 birth_*, absorb(birth congress_chamber state_rep_id) cluster(state_rep_id icpsr) keepsingletons
su wnom1_redistr_issue if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/Table4_panelB2.tex", se bdec(3) keep(recession_state_26_33) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, Yes, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, No, Cohort FE, Yes, State 18-25 Dummies, Yes) ///
		nocons label
* column (3)
reghdfe wnom1_redistr_issue_wp recession_state_26_33 birth_*, absorb(birth congress_chamber_party state_rep_id) cluster(state_rep_id icpsr) keepsingletons
su wnom1_redistr_issue_wp if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/Table4_panelB2.tex", se bdec(3) keep(recession_state_26_33) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, No, Congress-Chamber-Party FE, Yes, Congress-Chamber-Party-State FE, No, Cohort FE, Yes, State 18-25 Dummies, Yes) ///
		nocons label
* column (4)
reghdfe wnom1_redistr_issue_wp recession_state_26_33 birth_*, absorb(birth congress_chamber_state_party) cluster(state_rep_id icpsr) keepsingletons
su wnom1_redistr_issue_wp if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/Table4_panelB2.tex", se bdec(3) keep(recession_state_26_33) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, No, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, Yes, Cohort FE, Yes, State 18-25 Dummies, Yes) ///
		nocons label
* column (5)
reghdfe wnom1_redistr_issue_wp recession_state_26_33 birth_* if dem==1, absorb(birth congress_chamber_party state_rep_id) cluster(state_rep_id icpsr) keepsingletons
su wnom1_redistr_issue_wp if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/Table4_panelB2.tex", se bdec(3) keep(recession_state_26_33) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, No, Congress-Chamber-Party FE, Yes, Congress-Chamber-Party-State FE, No, Cohort FE, Yes, State 18-25 Dummies, Yes) ///
		nocons label
* column (6)
reghdfe wnom1_redistr_issue_wp recession_state_26_33 birth_* if dem==0, absorb(birth congress_chamber_party state_rep_id) cluster(state_rep_id icpsr) keepsingletons
su wnom1_redistr_issue_wp if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/Table4_panelB2.tex", se bdec(3) keep(recession_state_26_33) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, No, Congress-Chamber-Party FE, Yes, Congress-Chamber-Party-State FE, No, Cohort FE, Yes, State 18-25 Dummies, Yes) ///
		nocons label



		
***********
* Table 5 *
***********
use "Data/CarreriTeso_MC_Congress_level_data.dta", clear
* column (1)
reghdfe wnom1_redistr_issue ivy_league_recession recession_state_18_25 ivy_league *_siFE_2, absorb(birth congress_chamber) cluster(state_cluster_1 icpsr) keepsingletons
su wnom1_redistr_issue if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/Table5.tex", se bdec(3) keep(ivy_league_recession recession_state_18_25 ivy_league) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, Yes, Congress-Chamber-State FE, No, Cohort FE, N, State 18-25 Dummies, Yes, Cohort Trends, Yes, State Represented FE, No) ///
		nocons label 		
* column (2)
reghdfe wnom1_redistr_issue ivy_league_recession recession_state_18_25 ivy_league *_siFE_2 birth_*, absorb(birth congress_chamber) cluster(state_cluster_1 icpsr) keepsingletons
su wnom1_redistr_issue if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/Table5.tex", se bdec(3) keep(ivy_league_recession recession_state_18_25 ivy_league) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, Yes, Congress-Chamber-State FE, No, Cohort FE, Yes, State 18-25 Dummies, Yes, Cohort Trends, Yes, State Represented FE, No) ///
		nocons label 		
* column (3)
reghdfe wnom1_redistr_issue ivy_league_recession recession_state_18_25 ivy_league *_siFE_2 birth_*, absorb(birth congress_chamber_state) cluster(state_cluster_1 icpsr) keepsingletons
su wnom1_redistr_issue if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/Table5.tex", se bdec(3) keep(ivy_league_recession recession_state_18_25 ivy_league) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, Yes, Congress-Chamber-State FE, No, Cohort FE, Yes, State 18-25 Dummies, Yes, Cohort Trends, Yes, State Represented FE, Yes) ///
		nocons label 
* column (4)
reghdfe wnom1_redistr_issue elite_recession_share recession_state_18_25 elite_share *_siFE_2, absorb(birth congress_chamber) cluster(state_cluster_1 icpsr) keepsingletons
su wnom1_redistr_issue if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/Table5.tex", se bdec(3) keep(elite_recession_share recession_state_18_25 elite_share) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, Yes, Congress-Chamber-State FE, No, Cohort FE, Yes, State 18-25 Dummies, Yes, Cohort Trends, No, State Represented FE, No) ///
		nocons label
* column (5)
reghdfe wnom1_redistr_issue elite_recession_share recession_state_18_25 elite_share *_siFE_2 birth_*, absorb(birth congress_chamber) cluster(state_cluster_1 icpsr) keepsingletons
su wnom1_redistr_issue if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/Table5.tex", se bdec(3) keep(elite_recession_share recession_state_18_25 elite_share) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, Yes, Congress-Chamber-State FE, No, Cohort FE, Yes, State 18-25 Dummies, Yes, Cohort Trends, Yes, State Represented FE, No) ///
		nocons label 		
* column (6)
reghdfe wnom1_redistr_issue elite_recession_share recession_state_18_25 elite_share *_siFE_2 birth_*, absorb(birth congress_chamber_state) cluster(state_cluster_1 icpsr) keepsingletons
su wnom1_redistr_issue if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/Table5.tex", se bdec(3) keep(elite_recession_share recession_state_18_25 elite_share) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, Yes, Congress-Chamber-State FE, No, Cohort FE, Yes, State 18-25 Dummies, Yes, Cohort Trends, Yes, State Represented FE, Yes) ///
		nocons label 		
* column (7)
reghdfe wnom1_redistr_issue elitecensus_recession recession_state_18_25 elitecensus *_siFE_2, absorb(birth congress_chamber) cluster(state_cluster_1 icpsr) keepsingletons
su wnom1_redistr_issue if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/Table5.tex", se bdec(3) keep(elitecensus_recession recession_state_18_25 elitecensus) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, Yes, Congress-Chamber-State FE, No, Cohort FE, Yes, State 18-25 Dummies, Yes, Cohort Trends, No, State Represented FE, No) ///
		nocons label
* column (8)
reghdfe wnom1_redistr_issue elitecensus_recession recession_state_18_25 elitecensus *_siFE_2 birth_*, absorb(birth congress_chamber) cluster(state_cluster_1 icpsr) keepsingletons
su wnom1_redistr_issue if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/Table5.tex", se bdec(3) keep(elitecensus_recession recession_state_18_25 elitecensus) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, Yes, Congress-Chamber-State FE, No, Cohort FE, Yes, State 18-25 Dummies, Yes, Cohort Trends, Yes, State Represented FE, No) ///
		nocons label 		
* column (9)
reghdfe wnom1_redistr_issue elitecensus_recession recession_state_18_25 elitecensus *_siFE_2 birth_*, absorb(birth congress_chamber_state) cluster(state_cluster_1 icpsr) keepsingletons
su wnom1_redistr_issue if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/Table5.tex", se bdec(3) keep(elitecensus_recession recession_state_18_25 elitecensus) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, Yes, Congress-Chamber-State FE, No, Cohort FE, Yes, State 18-25 Dummies, Yes, Cohort Trends, Yes, State Represented FE, Yes) ///
		nocons label


		
		
		
************************************************
*                                              *
*                   APPENDIX                   *
*              TABLES AND FIGURES              *
*                                              *
************************************************


************
* Table A1 *
************
use "Data/CarreriTeso_MC_Congress_level_data.dta", clear
sutex2 wnom1_redistr_issue  wnom1_redistr_issue_wp ///
       recession_state_18_25  ///
	    recession_state_10_17 recession_state_26_33 recession_state_26_33_alt ///
		minority ivy_league elite_share elitecensus relativ2 dem ///
	   , minmax digits(3) saving(TableA1.tex) varlabels replace
	   


	   
************
* Table A2 *
************
use "Data/CarreriTeso_unemployment.dta", clear
* column (1)
areg unemployment_rate recession i.year , absorb(state_id) cl(state_id)
outreg2 recession using "Results/TableA2.tex", label bdec(3) tdec(3) ///
	addtext(Year FE, Yes, State FE, Yes, Real Per Capita Income, No) ///
	nocon keep(recession) replace
* column (2)
areg unemployment_rate recession i.year real_percapita_personal_income , absorb(state_id) cl(state_id)
outreg2 recession using "Results/TableA2.tex", label bdec(3) tdec(3) ///
	addtext(Year FE, Yes, State FE, Yes, Real Per Capita Income, Yes) ///
	nocon keep(recession)


	
************
* Table A3 *
************
set seed 231
global boot_rep 1000000 // set the number of reps for bootstrapping procedure
use "Data/CarreriTeso_MC_Congress_level_data.dta", clear
* column (1)
reghdfe wnom1_redistr_issue recession_region_18_25, absorb(congress_chamber) cluster(region_cluster_1 icpsr) keepsingletons
su wnom1_redistr_issue if e(sample)==1
local ysd = r(sd)
local pval = "(`:di %5.3f = (2 * ttail(e(df_r), abs(_b[recession_region_18_25]/_se[recession_region_18_25])))')"
boottest recession_region_18_25, cluster(region_cluster_1 icpsr) bootcluster(region_cluster_1) weight(webb) reps($boot_rep) boottype(wild) nograph
local boot_p = "(`:di %5.3f =r(p)')"
outreg2 using "Results/TableA3.tex", se bdec(3) keep(recession_region_18_25) ///
		adds(SD DV, `ysd', P-value (clustered),`pval', P-value (bootstrap),`boot_p') ///
		addtext(Region 18-25 Dummies, No, Cohort FE, No, Cohort Trends, No, Congress-Chamber FE, Yes, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, No, Sample, All) ///
		nocons label  
* column (2)
reghdfe wnom1_redistr_issue recession_region_18_25 *_riFE_2 birth_* i.birth, absorb(congress_chamber) cluster(region_cluster_1 icpsr) keepsingletons
su wnom1_redistr_issue if e(sample)==1
local ysd = r(sd)
local pval = "(`:di %5.3f = (2 * ttail(e(df_r), abs(_b[recession_region_18_25]/_se[recession_region_18_25])))')"
boottest recession_region_18_25, cluster(region_cluster_1 icpsr) bootcluster(region_cluster_1) weight(webb) reps($boot_rep) boottype(wild) nograph
local boot_p = "(`:di %5.3f =r(p)')"
outreg2 using "Results/TableA3.tex", se bdec(3) keep(recession_region_18_25) ///
		adds(SD DV, `ysd', P-value (clustered),`pval', P-value (bootstrap),`boot_p') ///
		addtext(Region 18-25 Dummies, Yes, Cohort FE, Yes, Cohort Trends, Yes, Congress-Chamber FE, Yes, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, No, Sample, All) ///
		nocons label  
* column (3)
reghdfe wnom1_redistr_issue_wp recession_region_18_25 *_riFE_2 birth_* i.birth, absorb(congress_chamber_party) cluster(region_cluster_1 icpsr) keepsingletons
su wnom1_redistr_issue_wp if e(sample)==1
local ysd = r(sd)
local pval = "(`:di %5.3f = (2 * ttail(e(df_r), abs(_b[recession_region_18_25]/_se[recession_region_18_25])))')"
boottest recession_region_18_25, cluster(region_cluster_1 icpsr) bootcluster(region_cluster_1) weight(webb) reps($boot_rep) boottype(wild) nograph
local boot_p = "(`:di %5.3f =r(p)')"
outreg2 using "Results/TableA3.tex", se bdec(3) keep(recession_region_18_25) ///
		adds(SD DV, `ysd', P-value (clustered),`pval', P-value (bootstrap),`boot_p') ///
		addtext(Region 18-25 Dummies, Yes, Cohort FE, Yes, Cohort Trends, Yes, Congress-Chamber FE, No, Congress-Chamber-Party FE, Yes, Congress-Chamber-Party-State FE, No, Sample, All) ///
		nocons label  
* column (4)
reghdfe wnom1_redistr_issue_wp recession_region_18_25 *_riFE_2 birth_* i.birth, absorb(congress_chamber_state_party) cluster(region_cluster_1 icpsr) keepsingletons
su wnom1_redistr_issue_wp if e(sample)==1
local ysd = r(sd)
local pval = "(`:di %5.3f = (2 * ttail(e(df_r), abs(_b[recession_region_18_25]/_se[recession_region_18_25])))')"
boottest recession_region_18_25, cluster(region_cluster_1 icpsr) bootcluster(region_cluster_1) weight(webb) reps($boot_rep) boottype(wild) nograph
local boot_p = "(`:di %5.3f =r(p)')"
outreg2 using "Results/TableA3.tex", se bdec(3) keep(recession_region_18_25) ///
		adds(SD DV, `ysd', P-value (clustered),`pval', P-value (bootstrap),`boot_p') ///
		addtext(Region 18-25 Dummies, Yes, Cohort FE, Yes, Cohort Trends, Yes, Congress-Chamber FE, No, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, Yes, Sample, All) ///
		nocons label  
* column (5)
reghdfe wnom1_redistr_issue_wp recession_region_18_25 *_riFE_2 birth_* i.birth if dem==1, absorb(congress_chamber_party) cluster(region_cluster_1 icpsr) keepsingletons
su wnom1_redistr_issue_wp if e(sample)==1
local ysd = r(sd)
local pval = "(`:di %5.3f = (2 * ttail(e(df_r), abs(_b[recession_region_18_25]/_se[recession_region_18_25])))')"
boottest recession_region_18_25, cluster(region_cluster_1 icpsr) bootcluster(region_cluster_1) weight(webb) reps($boot_rep) boottype(wild) nograph
local boot_p = "(`:di %5.3f =r(p)')"
outreg2 using "Results/TableA3.tex", se bdec(3) keep(recession_region_18_25) ///
		adds(SD DV, `ysd', P-value (clustered),`pval', P-value (bootstrap),`boot_p') ///
		addtext(Region 18-25 Dummies, Yes, Cohort FE, Yes, Cohort Trends, Yes, Congress-Chamber FE, Yes, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, No, Sample, Dem) ///
		nocons label 
* column (6)
reghdfe wnom1_redistr_issue_wp recession_region_18_25 *_riFE_2 birth_* i.birth if dem==0, absorb(congress_chamber_party) cluster(region_cluster_1 icpsr) keepsingletons
su wnom1_redistr_issue_wp if e(sample)==1
local ysd = r(sd)
local pval = "(`:di %5.3f = (2 * ttail(e(df_r), abs(_b[recession_region_18_25]/_se[recession_region_18_25])))')"
boottest recession_region_18_25, cluster(region_cluster_1 icpsr) bootcluster(region_cluster_1) weight(webb) reps($boot_rep) boottype(wild) nograph
local boot_p = "(`:di %5.3f =r(p)')"
outreg2 using "Results/TableA3.tex", se bdec(3) keep(recession_region_18_25) ///
		adds(SD DV, `ysd', P-value (clustered),`pval', P-value (bootstrap),`boot_p') ///
		addtext(Region 18-25 Dummies, Yes, Cohort FE, Yes, Cohort Trends, Yes, Congress-Chamber FE, Yes, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, No, Sample, Rep) ///
		nocons label 



************
* Table A4 *
************
use "Data/CarreriTeso_MC_Congress_level_data.dta", clear
* column (1)
reghdfe wnom1_redistr_issue recession_state_18_25, absorb(congress_chamber) cluster(birth icpsr) keepsingletons
su wnom1_redistr_issue if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/TableA4.tex", se bdec(3) keep(recession_state_18_25) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, Yes, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, No, Cohort FE, No, State 18-25 Dummies, No, Cohort Trends, No, State Represented FE, No) ///
		nocons label
* column (2)
reghdfe wnom1_redistr_issue recession_state_18_25 *_siFE_2 birth_*, absorb(birth congress_chamber) cluster(birth icpsr) keepsingletons
su wnom1_redistr_issue if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/TableA4.tex", se bdec(3) keep(recession_state_18_25) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, Yes, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, No, Cohort FE, Yes, State 18-25 Dummies, Yes, Cohort Trends, Yes, State Represented FE, No) ///
		nocons label	
* column (3)
reghdfe wnom1_redistr_issue_wp recession_state_18_25 *_siFE_2 birth_*, absorb(birth congress_chamber_party) cluster(birth icpsr) keepsingletons
su wnom1_redistr_issue_wp if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/TableA4.tex", se bdec(3) keep(recession_state_18_25) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, No, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, Yes, Cohort FE, Yes, State 18-25 Dummies, Yes, Cohort Trends, Yes, State Represented FE, No) ///
		nocons label
* column (4)
reghdfe wnom1_redistr_issue_wp recession_state_18_25 *_siFE_2 birth_*, absorb(birth congress_chamber_state_party) cluster(birth icpsr) keepsingletons
su wnom1_redistr_issue_wp if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/TableA4.tex", se bdec(3) keep(recession_state_18_25) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, No, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, Yes, Cohort FE, Yes, State 18-25 Dummies, Yes, Cohort Trends, Yes, State Represented FE, Yes) ///
		nocons label 		
* column (5)
reghdfe wnom1_redistr_issue_wp recession_state_18_25 *_siFE_2 birth_* if dem==1, absorb(birth congress_chamber) cluster(birth icpsr) keepsingletons
su wnom1_redistr_issue_wp if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/TableA4.tex", se bdec(3) keep(recession_state_18_25) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, No, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, Yes, Cohort FE, Yes, State 18-25 Dummies, Yes, Cohort Trends, Yes, State Represented FE, No) ///
		nocons label		
* column (6)
reghdfe wnom1_redistr_issue_wp recession_state_18_25 *_siFE_2 birth_* if dem==0, absorb(birth congress_chamber) cluster(birth icpsr) keepsingletons
su wnom1_redistr_issue_wp if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/TableA4.tex", se bdec(3) keep(recession_state_18_25) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, No, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, Yes, Cohort FE, Yes, State 18-25 Dummies, Yes, Cohort Trends, Yes, State Represented FE, No) ///
		nocons label
				



************
* Table A5 *
************
use "Data/CarreriTeso_MC_Congress_level_data.dta", clear
* column (1)
reghdfe wnom1_redistr_peltzman recession_state_18_25, absorb(congress_chamber) cluster(state_cluster_1 icpsr) keepsingletons
su wnom1_redistr_peltzman if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/TableA5.tex", se bdec(3) keep(recession_state_18_25) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, Yes, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, No, Cohort FE, No, State 18-25 Dummies, No, Cohort Trends, No, State Represented FE, No) ///
		nocons label
* column (2)
reghdfe wnom1_redistr_peltzman recession_state_18_25 *_siFE_2 birth_*, absorb(birth congress_chamber) cluster(state_cluster_1 icpsr) keepsingletons
su wnom1_redistr_peltzman if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/TableA5.tex", se bdec(3) keep(recession_state_18_25) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, Yes, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, No, Cohort FE, Yes, State 18-25 Dummies, Yes, Cohort Trends, Yes, State Represented FE, No) ///
		nocons label	
* column (3)
reghdfe wnom1_redistr_peltzman_wp recession_state_18_25 *_siFE_2 birth_*, absorb(birth congress_chamber_party) cluster(state_cluster_1 icpsr) keepsingletons
su wnom1_redistr_peltzman_wp if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/TableA5.tex", se bdec(3) keep(recession_state_18_25) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, No, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, Yes, Cohort FE, Yes, State 18-25 Dummies, Yes, Cohort Trends, Yes, State Represented FE, No) ///
		nocons label
* column (4)
reghdfe wnom1_redistr_peltzman_wp recession_state_18_25 *_siFE_2 birth_*, absorb(birth congress_chamber_state_party) cluster(state_cluster_1 icpsr) keepsingletons
su wnom1_redistr_peltzman_wp if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/TableA5.tex", se bdec(3) keep(recession_state_18_25) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, No, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, Yes, Cohort FE, Yes, State 18-25 Dummies, Yes, Cohort Trends, Yes, State Represented FE, Yes) ///
		nocons label 		
* column (5)
reghdfe wnom1_redistr_peltzman_wp recession_state_18_25 *_siFE_2 birth_* if dem==1, absorb(birth congress_chamber) cluster(state_cluster_1 icpsr) keepsingletons
su wnom1_redistr_peltzman_wp if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/TableA5.tex", se bdec(3) keep(recession_state_18_25) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, No, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, Yes, Cohort FE, Yes, State 18-25 Dummies, Yes, Cohort Trends, Yes, State Represented FE, No) ///
		nocons label		
* column (6)
reghdfe wnom1_redistr_peltzman_wp recession_state_18_25 *_siFE_2 birth_* if dem==0, absorb(birth congress_chamber) cluster(state_cluster_1 icpsr) keepsingletons
su wnom1_redistr_peltzman_wp if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/TableA5.tex", se bdec(3) keep(recession_state_18_25) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, No, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, Yes, Cohort FE, Yes, State 18-25 Dummies, Yes, Cohort Trends, Yes, State Represented FE, No) ///
		nocons label	


************
* Table A6 *
************
use "Data/CarreriTeso_MC_Congress_level_data.dta", clear
bys icpsr: gen N=_N
gen weight_obs=1/N
*column (1)
reghdfe wnom1_redistr_issue recession_state_18_25 [weight=weight_obs], absorb(congress_chamber) cluster(state_cluster_1 icpsr) keepsingletons
su wnom1_redistr_issue if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/TableA6.tex", se bdec(3) keep(recession_state_18_25) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, Yes, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, No, Cohort FE, No, State 18-25 Dummies, No, Cohort Trends, No, State Represented FE, No) ///
		nocons label
*column (2)
reghdfe wnom1_redistr_issue recession_state_18_25 *_siFE_2 birth_* [weight=weight_obs], absorb(birth congress_chamber) cluster(state_cluster_1 icpsr) keepsingletons
su wnom1_redistr_issue if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/TableA6.tex", se bdec(3) keep(recession_state_18_25) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, Yes, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, No, Cohort FE, Yes, State 18-25 Dummies, Yes, Cohort Trends, Yes, State Represented FE, No) ///
		nocons label	
*column (3)
reghdfe wnom1_redistr_issue_wp recession_state_18_25 *_siFE_2 birth_* [weight=weight_obs], absorb(birth congress_chamber_party) cluster(state_cluster_1 icpsr) keepsingletons
su wnom1_redistr_issue_wp if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/TableA6.tex", se bdec(3) keep(recession_state_18_25) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, No, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, Yes, Cohort FE, Yes, State 18-25 Dummies, Yes, Cohort Trends, Yes, State Represented FE, No) ///
		nocons label
*column (4)
reghdfe wnom1_redistr_issue_wp recession_state_18_25 *_siFE_2 birth_* [weight=weight_obs], absorb(birth congress_chamber_state_party) cluster(state_cluster_1 icpsr) keepsingletons
su wnom1_redistr_issue_wp if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/TableA6.tex", se bdec(3) keep(recession_state_18_25) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, No, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, Yes, Cohort FE, Yes, State 18-25 Dummies, Yes, Cohort Trends, Yes, State Represented FE, Yes) ///
		nocons label 		
*column (5)
reghdfe wnom1_redistr_issue_wp recession_state_18_25 *_siFE_2 birth_* [weight=weight_obs] if dem==1, absorb(birth congress_chamber) cluster(state_cluster_1 icpsr) keepsingletons
su wnom1_redistr_issue_wp if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/TableA6.tex", se bdec(3) keep(recession_state_18_25) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, No, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, Yes, Cohort FE, Yes, State 18-25 Dummies, Yes, Cohort Trends, Yes, State Represented FE, No) ///
		nocons label		
*column (6)
reghdfe wnom1_redistr_issue_wp recession_state_18_25 *_siFE_2 birth_* [weight=weight_obs] if dem==0, absorb(birth congress_chamber) cluster(state_cluster_1 icpsr) keepsingletons
su wnom1_redistr_issue_wp if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/TableA6.tex", se bdec(3) keep(recession_state_18_25) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, No, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, Yes, Cohort FE, Yes, State 18-25 Dummies, Yes, Cohort Trends, Yes, State Represented FE, No) ///
		nocons label
		
		
		
		
************
* Table A7 *
************	
use "Data/CarreriTeso_MC_Congress_level_data_allMCs", clear	
* column (1)
reghdfe wnom1_redistr_issue recession_state_18_25, absorb(congress_chamber) cluster(state_cluster_1 icpsr) keepsingletons
su wnom1_redistr_issue if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/TableA7.tex", se bdec(3) keep(recession_state_18_25) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, Yes, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, No, Cohort FE, No, State 18-25 Dummies, No, Cohort Trends, No, State Represented FE, No) ///
		nocons label
* column (2)
reghdfe wnom1_redistr_issue recession_state_18_25 *_siFE_2 birth_*, absorb(birth congress_chamber) cluster(state_cluster_1 icpsr) keepsingletons
su wnom1_redistr_issue if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/TableA7.tex", se bdec(3) keep(recession_state_18_25) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, Yes, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, No, Cohort FE, Yes, State 18-25 Dummies, Yes, Cohort Trends, Yes, State Represented FE, No) ///
		nocons label	
* column (3)
reghdfe wnom1_redistr_issue_wp recession_state_18_25 *_siFE_2 birth_*, absorb(birth congress_chamber_party) cluster(state_cluster_1 icpsr) keepsingletons
su wnom1_redistr_issue_wp if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/TableA7.tex", se bdec(3) keep(recession_state_18_25) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, No, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, Yes, Cohort FE, Yes, State 18-25 Dummies, Yes, Cohort Trends, Yes, State Represented FE, No) ///
		nocons label
* column (4)
reghdfe wnom1_redistr_issue_wp recession_state_18_25 *_siFE_2 birth_*, absorb(birth congress_chamber_state_party) cluster(state_cluster_1 icpsr) keepsingletons
su wnom1_redistr_issue_wp if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/TableA7.tex", se bdec(3) keep(recession_state_18_25) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, No, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, Yes, Cohort FE, Yes, State 18-25 Dummies, Yes, Cohort Trends, Yes, State Represented FE, Yes) ///
		nocons label 		
* column (5)
reghdfe wnom1_redistr_issue_wp recession_state_18_25 *_siFE_2 birth_* if dem==1, absorb(birth congress_chamber) cluster(state_cluster_1 icpsr) keepsingletons
su wnom1_redistr_issue_wp if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/TableA7.tex", se bdec(3) keep(recession_state_18_25) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, No, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, Yes, Cohort FE, Yes, State 18-25 Dummies, Yes, Cohort Trends, Yes, State Represented FE, No) ///
		nocons label		
* column (6)
reghdfe wnom1_redistr_issue_wp recession_state_18_25 *_siFE_2 birth_* if dem==0, absorb(birth congress_chamber) cluster(state_cluster_1 icpsr) keepsingletons
su wnom1_redistr_issue_wp if e(sample)==1
local sd: display %5.3fc `r(sd)' 
outreg2 using "Results/TableA7.tex", se bdec(3) keep(recession_state_18_25) ///
		adds(SD DV, `sd') ///
		addtext(Congress-Chamber FE, No, Congress-Chamber-Party FE, No, Congress-Chamber-Party-State FE, Yes, Cohort FE, Yes, State 18-25 Dummies, Yes, Cohort Trends, Yes, State Represented FE, No) ///
		nocons label	


		
*************
* Figure A1 *
*************
use "Data/CarreriTeso_state_recessions", clear
twoway scatter state_code yearnew if yearnew>=1930 & yearnew<=2008, ///
	ylabel(1(1)51,val angle(0) labsize(vsmall)) ///
	xlabel(1930(5)2008,val labsize(small)) ///
	ytitle("") xtitle("Year") msize(tiny) scheme(s1color)
graph export "Results/FigureA1.pdf", as(pdf) replace



*************
* Figure A2 *
*************
*** Panel (a)
use "Data/CarreriTeso_MC_Congress_level_data.dta", clear
preserve
drop if inlist("Alaska", State_impressionable_1 , State_impressionable_2  ,State_impressionable_3)
reghdfe wnom1_redistr_issue_wp recession_state_18_25 *_siFE_2 birth_*, absorb(birth congress_chamber_party) cluster(state_cluster_1 icpsr) keepsingletons
local b1 = _b[recession_state_18_25]
local ub5_b1 = _b[recession_state_18_25] + 1.96*_se[recession_state_18_25]
local lb5_b1 = _b[recession_state_18_25] - 1.96*_se[recession_state_18_25]
local ub10_b1 = _b[recession_state_18_25] + 1.645*_se[recession_state_18_25]
local lb10_b1 = _b[recession_state_18_25] - 1.645*_se[recession_state_18_25]
restore

preserve
drop if inlist("Hawaii", State_impressionable_1 , State_impressionable_2  ,State_impressionable_3)
reghdfe wnom1_redistr_issue_wp recession_state_18_25 *_siFE_2 birth_*, absorb(birth congress_chamber_party) cluster(state_cluster_1 icpsr) keepsingletons
local b2 = _b[recession_state_18_25]
local ub5_b2 = _b[recession_state_18_25] + 1.96*_se[recession_state_18_25]
local lb5_b2 = _b[recession_state_18_25] - 1.96*_se[recession_state_18_25]
local ub10_b2 = _b[recession_state_18_25] + 1.645*_se[recession_state_18_25]
local lb10_b2 = _b[recession_state_18_25] - 1.645*_se[recession_state_18_25]
restore

preserve
drop if inlist("DC", State_impressionable_1 , State_impressionable_2  ,State_impressionable_3)
reghdfe wnom1_redistr_issue_wp recession_state_18_25 *_siFE_2 birth_*, absorb(birth congress_chamber_party) cluster(state_cluster_1 icpsr) keepsingletons
local b3 = _b[recession_state_18_25]
local ub5_b3 = _b[recession_state_18_25] + 1.96*_se[recession_state_18_25]
local lb5_b3 = _b[recession_state_18_25] - 1.96*_se[recession_state_18_25]
local ub10_b3 = _b[recession_state_18_25] + 1.645*_se[recession_state_18_25]
local lb10_b3 = _b[recession_state_18_25] - 1.645*_se[recession_state_18_25]
restore		
	
preserve
drop if inlist("Alaska", State_impressionable_1 , State_impressionable_2  ,State_impressionable_3) | ///
		inlist("Hawaii", State_impressionable_1 , State_impressionable_2  ,State_impressionable_3) | ///
		inlist("DC", State_impressionable_1 , State_impressionable_2  ,State_impressionable_3) 
reghdfe wnom1_redistr_issue_wp recession_state_18_25 *_siFE_2 birth_*, absorb(birth congress_chamber_party) cluster(state_cluster_1 icpsr) keepsingletons
local b4 = _b[recession_state_18_25]
local ub5_b4 = _b[recession_state_18_25] + 1.96*_se[recession_state_18_25]
local lb5_b4 = _b[recession_state_18_25] - 1.96*_se[recession_state_18_25]
local ub10_b4 = _b[recession_state_18_25] + 1.645*_se[recession_state_18_25]
local lb10_b4 = _b[recession_state_18_25] - 1.645*_se[recession_state_18_25]
restore		

preserve
drop if birth<1932
reghdfe wnom1_redistr_issue_wp recession_state_18_25 *_siFE_2 birth_*, absorb(birth congress_chamber_party) cluster(state_cluster_1 icpsr) keepsingletons
local b5 = _b[recession_state_18_25]
local ub5_b5 = _b[recession_state_18_25] + 1.96*_se[recession_state_18_25]
local lb5_b5 = _b[recession_state_18_25] - 1.96*_se[recession_state_18_25]
local ub10_b5 = _b[recession_state_18_25] + 1.645*_se[recession_state_18_25]
local lb10_b5 = _b[recession_state_18_25] - 1.645*_se[recession_state_18_25]
restore	

clear
set obs 6
gen n=_n
replace n=5.5 if n==6
gen b=.
gen ub5_b=.
gen lb5_b=.
gen ub10_b=.
gen lb10_b=.
foreach i in 1 2 3 4 5 {
replace b = `b`i'' in `i'
replace ub5_b = `ub5_b`i'' in `i'
replace lb5_b = `lb5_b`i'' in `i'
replace ub10_b = `ub10_b`i'' in `i'
replace lb10_b = `lb10_b`i'' in `i'
}
foreach i in 1 2 3 4 5 {
local b`i'_lab: display %5.3f `b`i''
}
gen label_var=""
replace label_var="`b1_lab'***" in 1
replace label_var="`b2_lab'***" in 2
replace label_var="`b3_lab'***" in 3
replace label_var="`b4_lab'***" in 4
replace label_var="`b5_lab'*" in 5
 
twoway (rcap ub5_b lb5_b n, color(gs10)) ///
	   (rcap ub10_b lb10_b n, color(black)) ///
	   (scatter b n, color(black) mlabel(label_var) mlabposition(2) mlabgap(1.5) mlabs(medium) mlabc(gs3)) , ///
	   xtitle("", size(small)) ///
	   xlabel(1 "No Alaska" 2 "No Hawaii" 3 "No DC" 4 "No AK/HI/DC" 5 "> 1949", labsize(medium)) ///
	   ylabel(-0.05(0.05)0.2, labsize(medium) nogrid angle(0)) ///
	   graphregion(color(white)) plotregion(color(white)) ///
	   yline(0, lcolor(black) lwidth(medium)) ///
	   legend(off)
	   graph save "Results/FigureA2_panel(a)", replace
graph export "Results/FigureA2_panel(a).pdf", as(pdf) replace


*** Panel (b)
use "Data/CarreriTeso_MC_Congress_level_data.dta", clear
foreach i in 16_23 17_24 18_25 19_26 20_27 {
reghdfe wnom1_redistr_issue_wp recession_state_`i' *_siFE_2 birth_*, absorb(birth congress_chamber_party) cluster(state_cluster_1 icpsr) keepsingletons
local b`i' = _b[recession_state_`i']
local ub5_b`i' = _b[recession_state_`i'] + 1.96*_se[recession_state_`i']
local lb5_b`i' = _b[recession_state_`i'] - 1.96*_se[recession_state_`i']
local ub10_b`i' = _b[recession_state_`i'] + 1.645*_se[recession_state_`i']
local lb10_b`i' = _b[recession_state_`i'] - 1.645*_se[recession_state_`i']
}
clear
set obs 6
gen age_range= "16_23"
replace age_range="17_24" in 2
replace age_range="18_25" in 3
replace age_range="19_26" in 4
replace age_range="20_27" in 5
replace age_range="" in 6
gen b=.
gen ub5_b=.
gen lb5_b=.
gen ub10_b=.
gen lb10_b=.
foreach i in 16_23 17_24 18_25 19_26 20_27 {
replace b = `b`i'' if age_range=="`i'"
replace ub5_b = `ub5_b`i'' if age_range=="`i'"
replace lb5_b = `lb5_b`i'' if age_range=="`i'"
replace ub10_b = `ub10_b`i'' if age_range=="`i'"
replace lb10_b = `lb10_b`i'' if age_range=="`i'"
}
foreach i in 16_23 17_24 18_25 19_26 20_27 {
local b`i'_lab: display %5.3f `b`i''
}
gen label_var=""
replace label_var="`b16_23_lab'***" if age_range=="16_23"
replace label_var="`b17_24_lab'**" if age_range=="17_24"
replace label_var="`b18_25_lab'***" if age_range=="18_25"
replace label_var="`b19_26_lab'***" if age_range=="19_26"
replace label_var="`b20_27_lab'" if age_range=="20_27"
foreach x in b ub5_b lb5_b ub10_b lb10_b {
gen main_`x' = `x'
replace main_`x'=. if age_range!="18_25"
replace `x'=. if age_range=="18_25"
}
encode age_range, gen(age_range_num)
replace age_range_num=5.5 if age_range==""
twoway (rcap ub5_b lb5_b age_range_num, color(gs10)) ///
	   (rcap ub10_b lb10_b age_range_num, color(black)) ///
	   (scatter b age_range_num, color(black) mlabel(label_var) mlabposition(2) mlabgap(1.5) mlabs(medium) mlabc(gs3)) ///
	   (rcap main_ub5_b main_lb5_b age_range_num, color(orange)) ///
	   (rcap main_ub10_b main_lb10_b age_range_num, color(red)) ///
	   (scatter main_b age_range_num, color(red) mlabel(label_var) mlabposition(2) mlabgap(1.5) mlabs(medium) mlabc(red)), ///
	   xtitle("", size(small)) ///
	   xlabel(1 "16-23" 2 "17-24" 3 "18-25" 4 "19-26" 5 "20-27", labsize(medium)) ///
	   ylabel(-0.05(0.05)0.2, labsize(medium) nogrid angle(0)) ///
	   graphregion(color(white)) plotregion(color(white)) ///
	   yline(0, lcolor(black) lwidth(medium)) ///
	   legend(off)
	   graph save "Results/FigureA2_panel(b)", replace
graph export "Results/FigureA2_panel(b).pdf", as(pdf) replace
	

*** Panel (c)
use "Data/CarreriTeso_MC_Congress_level_data.dta", clear
forvalues i=5(1)15{
reghdfe wnom1_redistr_issue_wp recession_state_18_25_`i' *_siFE_2 birth_*, ///
 absorb(birth congress_chamber_party) cluster(state_cluster_1 icpsr) keepsingletons
local b`i' = _b[recession_state_18_25_`i']
local ub5_b`i' = _b[recession_state_18_25_`i'] + 1.96*_se[recession_state_18_25_`i']
local lb5_b`i' = _b[recession_state_18_25_`i'] - 1.96*_se[recession_state_18_25_`i']
local ub10_b`i' = _b[recession_state_18_25_`i'] + 1.645*_se[recession_state_18_25_`i']
local lb10_b`i' = _b[recession_state_18_25_`i'] - 1.645*_se[recession_state_18_25_`i']
}
clear
set obs 16
egen percentile = seq()
gen b=.
gen ub5_b=.
gen lb5_b=.
gen ub10_b=.
gen lb10_b=.
forvalues i=5(1)15{
replace b = `b`i'' in `i'
replace ub5_b = `ub5_b`i'' in `i'
replace lb5_b = `lb5_b`i'' in `i'
replace ub10_b = `ub10_b`i'' in `i'
replace lb10_b = `lb10_b`i'' in `i'
}
forvalues i=5(1)15{
local b`i'_lab: display %5.3f `b`i''
}
gen label_var=""
replace label_var="`b5_lab'**" in 5
replace label_var="`b6_lab'***" in 6
replace label_var="`b7_lab'**" in 7
replace label_var="`b8_lab'" in 8
replace label_var="`b9_lab'***" in 9
replace label_var="`b10_lab'***" in 10
replace label_var="`b11_lab'*" in 11
replace label_var="`b12_lab'**" in 12
replace label_var="`b13_lab'*" in 13
replace label_var="`b14_lab'" in 14
replace label_var="`b15_lab'" in 15
foreach x in b ub5_b lb5_b ub10_b lb10_b {
gen main_`x' = `x'
replace main_`x'=. if percentile!=10
replace `x'=. if percentile==10
}
drop if percentile<5
replace percentile=15.5 if percentile==16
twoway (rcap ub5_b lb5_b percentile, color(gs10)) ///
	   (rcap ub10_b lb10_b percentile, color(black)) ///
	   (scatter b percentile, color(black) mlabel(label_var) mlabposition(1) mlabgap(1) mlabs(small) mlabc(gs3)) ///
	   (rcap main_ub5_b main_lb5_b percentile, color(orange)) ///
	   (rcap main_ub10_b main_lb10_b percentile, color(red)) ///
	   (scatter main_b percentile, color(red)  mlabel(label_var) mlabposition(1) mlabgap(0.5) mlabs(small) mlabc(red)), ///
	   xtitle("", size(small)) ///
	   xlabel(5 "5{sup:th}" 6 "6{sup:th}" 7 "7{sup:th}" 8 "8{sup:th}" 9 "9{sup:th}" 10 "10{sup:th}"11 "11{sup:th}" ///
	   12 "12{sup:th}" 13 "13{sup:th}" 14 "14{sup:th}" 15 "15{sup:th}", labsize(medium)) ///
	   ylabel(-0.1(0.05)0.25, labsize(medium) nogrid angle(0)) ///
	   graphregion(color(white)) plotregion(color(white)) ///
	   yline(0, lcolor(black) lwidth(medium)) ///
	   legend(off)
	   graph save "Results/FigureA2_panel(c)", replace
graph export "Results/FigureA2_panel(c).pdf", as(pdf) replace


*** Panel (d)
use "Data/CarreriTeso_MC_Congress_level_data.dta", clear
reghdfe wnom1_redistr_issue_wp recession_state_2225 *_siFE_2225 birth_*, absorb(birth congress_chamber_party) cluster(State_impressionable_2225_1 icpsr) keepsingletons
local b5 = _b[recession_state_2225]
local ub5_b5 = _b[recession_state_2225] + 1.96*_se[recession_state_2225]
local lb5_b5 = _b[recession_state_2225] - 1.96*_se[recession_state_2225]
local ub10_b5 = _b[recession_state_2225] + 1.645*_se[recession_state_2225]
local lb10_b5 = _b[recession_state_2225] - 1.645*_se[recession_state_2225]

reghdfe wnom1_redistr_issue_wp recession_state_1821 *_siFE_1821 birth_*, absorb(birth congress_chamber_party) cluster(State_impressionable_1821_1 icpsr) keepsingletons
local b3 = _b[recession_state_1821]
local ub5_b3 = _b[recession_state_1821] + 1.96*_se[recession_state_1821]
local lb5_b3 = _b[recession_state_1821] - 1.96*_se[recession_state_1821]
local ub10_b3 = _b[recession_state_1821] + 1.645*_se[recession_state_1821]
local lb10_b3 = _b[recession_state_1821] - 1.645*_se[recession_state_1821]

reghdfe wnom1_redistr_issue_wp recession_state_1821 *_siFE_1821 birth_* if (State_impressionable_1821_1== state_hischool)  &  State_impressionable_1821_2=="" , absorb(birth congress_chamber_party) cluster(State_impressionable_1821_1 icpsr) keepsingletons
local b7 = _b[recession_state_1821]
local ub5_b7 = _b[recession_state_1821] + 1.96*_se[recession_state_1821]
local lb5_b7 = _b[recession_state_1821] - 1.96*_se[recession_state_1821]
local ub10_b7 = _b[recession_state_1821] + 1.645*_se[recession_state_1821]
local lb10_b7 = _b[recession_state_1821] - 1.645*_se[recession_state_1821]

clear
set obs 9
gen n=_n
gen b=.
gen ub5_b=.
gen lb5_b=.
gen ub10_b=.
gen lb10_b=.
foreach i in 3 5 7 {
replace b = `b`i'' in `i'
replace ub5_b = `ub5_b`i'' in `i'
replace lb5_b = `lb5_b`i'' in `i'
replace ub10_b = `ub10_b`i'' in `i'
replace lb10_b = `lb10_b`i'' in `i'
}
foreach i in 3 5 7 {
local b`i'_lab: display %5.3f `b`i''
}
gen label_var=""
replace label_var="`b3_lab'***" in 3
replace label_var="`b5_lab'***" in 5
replace label_var="`b7_lab'***" in 7

twoway (rcap ub5_b lb5_b n, color(gs10)) ///
	   (rcap ub10_b lb10_b n, color(black)) ///
	   (scatter b n, color(black) mlabel(label_var) mlabposition(2) mlabgap(1.5) mlabs(medium) mlabc(gs3)) , ///
	   xtitle("", size(small)) ///
	   xlabel(3 "22-25" 5 "18-21" 7 "Non-movers", labsize(medium)) ///
	   ylabel(-0.05(0.05)0.2, labsize(medium) nogrid angle(0)) ///
	   graphregion(color(white)) plotregion(color(white)) ///
	   yline(0, lcolor(black) lwidth(medium)) ///
	   legend(off)
	   graph save "Results/FigureA2_panel(d)", replace
graph export "Results/FigureA2_panel(d).pdf", as(pdf) replace





***************
* Footnote 15 *
***************
use "Data/CarreriTeso_MC_Congress_level_data.dta", clear
reghdfe grad_school recession_state_1821 *_siFE_1821 birth_*, absorb(birth congress_chamber_party) cluster(State_impressionable_1821_1 icpsr) keepsingletons
su grad_school if e(sample)==1





log close


